package com.appclient;

import javafx.scene.layout.StackPane;

/**
 *
 * @author Sawior
 */
public class ScreensFramework extends StackPane {

    public static final String MAIN_SCREEN = "Menu";
    public static final String MAIN_SCREEN_FXML = "menuContent.fxml";
    public static final String CLIENT_WIZARD_SCREEN = "Nowy klient";
    public static final String CLIENT_WIZARD_SCREEN_FXML = "newClientWizard.fxml";
    public static final String OTHER_WIZARD_SCREEN = "Inne";
    public static final String OTHER_WIZARD_SCREEN_FXML = "OtherMenuPanel.fxml";
    public static final String RAPORT_WIZARD_SCREEN = "Raporty";
    public static final String RAPORT_WIZARD_SCREEN_FXML = "raportWrapper.fxml";
    public static final String ENTRY_WIZARD_SCREEN = "Wjazdy";
    public static final String ENTRY_WIZARD_SCREEN_FXML = "entries.fxml";
    public static final String EXIT_WIZARD_SCREEN = "Wyjazdy";
    public static final String EXIT_WIZARD_SCREEN_FXML = "exits.fxml";
    public static final String TARRIF_SCREEN = "Cennik";
    public static final String TARRIF_SCREEN_FXML = "tarrifTableOnlyDisplay.fxml";
    public static final String STATE_SCREEN = "Aktualny stan";
    public static final String STATE_SCREEN_FXML = "spacesState.fxml";
    public static final String RECEIVABLES_SCREEN = "Płatności";
    public static final String RECEIVABLES_SCREEN_FXML = "receivablesTable.fxml";
    public static final String NEW_CAR_SCREEN = "Nowy pojazd";
    public static final String NEW_CAR_SCREEN_FXML = "newCarMain.fxml";

    private ScreensController mainContainer;

    public ScreensFramework(MainPanelController mainPanelController) {
        mainContainer = new ScreensController(mainPanelController);
        mainContainer.loadScreen(ScreensFramework.MAIN_SCREEN, ScreensFramework.MAIN_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.CLIENT_WIZARD_SCREEN, ScreensFramework.CLIENT_WIZARD_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.OTHER_WIZARD_SCREEN, ScreensFramework.OTHER_WIZARD_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.RAPORT_WIZARD_SCREEN, ScreensFramework.RAPORT_WIZARD_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.ENTRY_WIZARD_SCREEN, ScreensFramework.ENTRY_WIZARD_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.EXIT_WIZARD_SCREEN, ScreensFramework.EXIT_WIZARD_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.TARRIF_SCREEN, ScreensFramework.TARRIF_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.STATE_SCREEN, ScreensFramework.STATE_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.RECEIVABLES_SCREEN, ScreensFramework.RECEIVABLES_SCREEN_FXML);
        mainContainer.loadScreen(ScreensFramework.NEW_CAR_SCREEN, ScreensFramework.NEW_CAR_SCREEN_FXML);

        mainContainer.setScreen(ScreensFramework.MAIN_SCREEN);
        this.getChildren().addAll(mainContainer);

    }

    public ScreensController getScreensController() {
        return mainContainer;
    }
}
